#!/bin/bash
#SBATCH --job-name=python_job
#SBATCH --output=./logs/%x-%j.out
#SBATCH --error=./logs/%x-%j.err
#SBATCH --time=24:00:00
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=1
#SBATCH --mem=4G
#SBATCH --requeue

# Error handling: exit on any error and print commands as they execute
set -x -e

# Load your environment (adjust as needed)
source ~/.bashrc
source ~/venv/screensuite/bin/activate

echo "START TIME: $(date)"

# Get the run_name from command line argument, default to None if not provided
RUN_NAME=${1:-None}

echo "Running with run_name: $RUN_NAME"

python examples/run_benchmarks.py --run_name "$RUN_NAME"

echo "END TIME: $(date)"